# Maintainer:
# Contributor: damir <damir@archlinux.org>

pkgname=libnet
pkgver=1.1.6
pkgrel=3
pkgdesc="A library which provides API for commonly used low-level net functions"
arch=('x86_64')
url="https://sourceforge.net/projects/libnet-dev/"
license=('BSD')
depends=('glibc' 'sh')
source=("https://downloads.sourceforge.net/libnet-dev/${pkgname}-${pkgver}.tar.gz")
sha512sums=('a67e502b0e6957ca590e47cb50b0472dd83d622d84c62818d665d771616df91b5a8fa8fcf1040d13b7860aaabaf338152ef40f66ab97c3fc9502edb08cea0bb6')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make CFLAGS="${CFLAGS} -fPIC"
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  install -Dm644 doc/COPYING \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
